Skip to content

backport: hardening and bugfixes for main stable#283

Draft
somethingwithproof wants to merge 508 commits intoCacti:mainfrom
somethingwithproof:backport/main-hardening-v2
Draft

backport: hardening and bugfixes for main stable#283
somethingwithproof wants to merge 508 commits intoCacti:mainfrom
somethingwithproof:backport/main-hardening-v2

Conversation

@somethingwithproof
Copy link
Contributor

Consolidated backport of security and bugfix PRs.

weblate and others added 30 commits March 19, 2022 09:45
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.cacti.net/projects/cacti/syslog/
Translation: Cacti/syslog
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.cacti.net/projects/cacti/syslog/
Translation: Cacti/syslog
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.cacti.net/projects/cacti/syslog/
Translation: Cacti/syslog
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.cacti.net/projects/cacti/syslog/
Translation: Cacti/syslog
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.cacti.net/projects/cacti/syslog/
Translation: Cacti/syslog
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.cacti.net/projects/cacti/syslog/
Translation: Cacti/syslog
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.cacti.net/projects/cacti/syslog/
Translation: Cacti/syslog
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.cacti.net/projects/cacti/syslog/
Translation: Cacti/syslog
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.cacti.net/projects/cacti/syslog/
Translation: Cacti/syslog
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.cacti.net/projects/cacti/syslog/
Translation: Cacti/syslog
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.cacti.net/projects/cacti/syslog/
Translation: Cacti/syslog
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.cacti.net/projects/cacti/syslog/
Translation: Cacti/syslog
Though it's not complete.  This should reduce the number of warnings.
Currently translated at 33.8% (126 of 372 strings)

Co-authored-by: Anatoliy <hamrad99h2@gmail.com>
Translate-URL: http://translate.cacti.net/projects/cacti/syslog/ru/
Translation: Cacti/syslog
Updated by "Squash Git commits" hook in Weblate.

Translation: Cacti/syslog
Translate-URL: http://translate.cacti.net/projects/cacti/syslog/
This changes cleans up some logging as well.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.cacti.net/projects/cacti/syslog/
Translation: Cacti/syslog
somethingwithproof and others added 3 commits March 16, 2026 12:01
Refs Cacti#273

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Refs Cacti#280

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
somethingwithproof added a commit to somethingwithproof/plugin_syslog that referenced this pull request Mar 16, 2026
- LICENSE: remove stale conflict markers
- database.php: restore backward-compat optional param on syslog_db_fetch_insert_id
- js/functions.js: fix missing var declaration, #test->#term, prop('disabled'), remove empty .each()
- CI workflow: authenticate MySQL healthcheck, remove password echo
- populate script: INSERT -> REPLACE INTO for idempotent reruns
- README.md: fix malformed code fence
- locales: add exit after redirect, fix sed -i for macOS compat
- es-ES.po: fix 'Cactus' -> 'Cacti', 'Depuraración' -> 'Depuración'

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
@somethingwithproof somethingwithproof force-pushed the backport/main-hardening-v2 branch from a482d04 to bf55698 Compare March 16, 2026 16:43
Copy link
Member

@TheWitness TheWitness left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few comments here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the naming correct on this file. It looks very redundant.


header("Location:../index.php");
header('Location:../index.php');

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Take it out as the script exit's anyway after the location. Same in the other pull requests.

somethingwithproof added a commit to somethingwithproof/plugin_syslog that referenced this pull request Mar 18, 2026
- LICENSE: remove stale conflict markers
- database.php: restore backward-compat optional param on syslog_db_fetch_insert_id
- js/functions.js: fix missing var declaration, #test->#term, prop('disabled'), remove empty .each()
- CI workflow: authenticate MySQL healthcheck, remove password echo
- populate script: INSERT -> REPLACE INTO for idempotent reruns
- README.md: fix malformed code fence
- locales: add exit after redirect, fix sed -i for macOS compat
- es-ES.po: fix 'Cactus' -> 'Cacti', 'Depuraración' -> 'Depuración'

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
@somethingwithproof somethingwithproof force-pushed the backport/main-hardening-v2 branch from bf55698 to da87864 Compare March 18, 2026 19:12
@somethingwithproof
Copy link
Contributor Author

Yes -- working on all four items now.

somethingwithproof added a commit to somethingwithproof/plugin_syslog that referenced this pull request Mar 18, 2026
- Remove $uniqueID filter from syslog_remove query (incorrectly
  filtered removal rules by random batch marker)
- Reorder CI workflow: lint/PHPStan before integration tests
- Switch echo to print in syslog_batch_transfer.php

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
somethingwithproof added a commit to somethingwithproof/plugin_syslog that referenced this pull request Mar 18, 2026
- Remove $uniqueID filter from syslog_remove query (incorrectly
  filtered removal rules by random batch marker)
- Reorder CI workflow: lint/PHPStan before integration tests
- Switch echo to print in syslog_batch_transfer.php

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
* fix: trim xml import payload value before emptiness check

Refs Cacti#272

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* fix(i18n): correct zh-CN.po format string errors

Fix fullwidth percent signs and missing format specifiers.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

---------

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
* refactor: deduplicate selected-item bulk action dispatch

Refs Cacti#279

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* fix(i18n): correct zh-CN.po format string errors

Fix fullwidth percent signs and missing format specifiers.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

---------

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
@TheWitness
Copy link
Member

We should do this at release time I think. Just to minimize commits into this branch.

- LICENSE: remove stale conflict markers
- database.php: restore backward-compat optional param on syslog_db_fetch_insert_id
- js/functions.js: fix missing var declaration, #test->#term, prop('disabled'), remove empty .each()
- CI workflow: authenticate MySQL healthcheck, remove password echo
- populate script: INSERT -> REPLACE INTO for idempotent reruns
- README.md: fix malformed code fence
- locales: add exit after redirect, fix sed -i for macOS compat
- es-ES.po: fix 'Cactus' -> 'Cacti', 'Depuraración' -> 'Depuración'

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
- Remove $uniqueID filter from syslog_remove query (incorrectly
  filtered removal rules by random batch marker)
- Reorder CI workflow: lint/PHPStan before integration tests
- Switch echo to print in syslog_batch_transfer.php

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
somethingwithproof added a commit to somethingwithproof/plugin_syslog that referenced this pull request Mar 19, 2026
- LICENSE: remove stale conflict markers
- database.php: restore backward-compat optional param on syslog_db_fetch_insert_id
- js/functions.js: fix missing var declaration, #test->#term, prop('disabled'), remove empty .each()
- CI workflow: authenticate MySQL healthcheck, remove password echo
- populate script: INSERT -> REPLACE INTO for idempotent reruns
- README.md: fix malformed code fence
- locales: add exit after redirect, fix sed -i for macOS compat
- es-ES.po: fix 'Cactus' -> 'Cacti', 'Depuraración' -> 'Depuración'

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
somethingwithproof added a commit to somethingwithproof/plugin_syslog that referenced this pull request Mar 19, 2026
- Remove $uniqueID filter from syslog_remove query (incorrectly
  filtered removal rules by random batch marker)
- Reorder CI workflow: lint/PHPStan before integration tests
- Switch echo to print in syslog_batch_transfer.php

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
@somethingwithproof somethingwithproof force-pushed the backport/main-hardening-v2 branch from b1f3b8c to c5f4153 Compare March 19, 2026 17:19
somethingwithproof added a commit to somethingwithproof/plugin_syslog that referenced this pull request Mar 20, 2026
- LICENSE: remove stale conflict markers
- database.php: restore backward-compat optional param on syslog_db_fetch_insert_id
- js/functions.js: fix missing var declaration, #test->#term, prop('disabled'), remove empty .each()
- CI workflow: authenticate MySQL healthcheck, remove password echo
- populate script: INSERT -> REPLACE INTO for idempotent reruns
- README.md: fix malformed code fence
- locales: add exit after redirect, fix sed -i for macOS compat
- es-ES.po: fix 'Cactus' -> 'Cacti', 'Depuraración' -> 'Depuración'

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
somethingwithproof added a commit to somethingwithproof/plugin_syslog that referenced this pull request Mar 20, 2026
- Remove $uniqueID filter from syslog_remove query (incorrectly
  filtered removal rules by random batch marker)
- Reorder CI workflow: lint/PHPStan before integration tests
- Switch echo to print in syslog_batch_transfer.php

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
@somethingwithproof
Copy link
Contributor Author

Makes sense. Will hold this until release time to keep the main branch stable.

@somethingwithproof somethingwithproof marked this pull request as draft March 20, 2026 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.